import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

// El-Plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from "element-plus/es/locale/lang/zh-cn"
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 全局路由
import Nav from './components/Navigation.vue'
import Aside from './components/Aside.vue'

// 安全路由拦截
import './permission'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.component('Nav', Nav)
app.component('Aside', Aside)
app.use(ElementPlus, { locale: zhCn })
app.use(router)
app.mount('#app')
